// @ts-ignore
/* eslint-disable */
import { request } from '@umijs/max';
import qs from 'qs';

/** 登录操作 POST /sys/login */
export async function sysLoginControllerLogin(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  body: API.sysLoginControllerLoginParams,
  options?: { [key: string]: any },
) {
  return request<API.ApiResultToken>('/auth/oauth2/token', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded;',
    },
    data: qs.stringify(body),
    ...(options || {}),
    token: 'Basic ZXNzLXdlYjoxMjM0NTY=',
  });
}
